package com;
import java.io.*;
public class Reader {
    public static void main(String[] args) throws Exception {
        File file = new File("D:" + File.separator + "baidu" + File.separator + "www.baidu.txt");
        if (file.exists()) {
        try (FileReader in = new FileReader(file)){
            char data[] = new char[1024];
            int len = in.read(data);
            System.out.println(new String(data, 0, len));
        } catch (Exception e) {}
        }
    }
}
